<template>
  <div>
    <el-card>
      <div class="box">
        <img :src="useStore.avatar" alt="" class="avatar">
        <div class="bottom">
          <h3 class="title">{{ getTime() }}好{{ useStore.username }}</h3>
          <p class="subTitle">{{ settings.title }}</p>
        </div>
      </div>
    </el-card>
    <div class="bottom-icon">
      <svg-icon name="welcome" width="600px" height="300px"></svg-icon>
    </div>
  </div>
</template>
<script setup lang="ts">
// 获取用户小仓库
import useUserStore from '@/store/modules/user'
import { getTime } from '@/utils/time';
// 引入标题
import settings from '@/settings';
// 展示用户的名字和头像
let useStore = useUserStore()
</script>
<script lang="ts">
export default {
  name: 'Home'
}
</script>
<style scoped lang="scss">
.box {
  display: flex;

  .avatar {
    height: 100px;
    width: 100px;
    border-radius: 50%;
  }

  .bottom {
    margin-left: 20px;

    .title {
      font-size: 30px;
      font-weight: 900;
      margin-bottom: 30px;
    }
    .subTitle {
      font-style: italic;
      color: gray;
    }
  }
}

.bottom-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  
}</style>
